<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>日历插件</title>
<link rel="stylesheet" type="text/css"
	href="./static/css/fullcalendar.css">
<link rel="stylesheet" type="text/css" href="./static/css/fancybox.css">
<link rel="stylesheet" type="text/css"
	href="./static/css/jquery-ui.min.css">
<link href='./static/css/fullcalendar.print.css' rel='stylesheet'
	media='print' />
<script src='./static/js/common/jquery-1.11.3.min.js'></script>
<script type="text/javascript"
	src="./static/js/common/jquery.form.min.js"></script>
<script src='./static/js/cal/moment.min.js'></script>
<script src='./static/js/common/jquery-ui.custom.min.js'></script>
<script src='./static/js/cal/fullcalendar.min.js'></script>
<script src='./static/js/cal/jquery.fancybox-1.3.1.pack.js'></script>


<style>
body {
	margin: 40px 10px;
	padding: 0;
	font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
	font-size: 14px;
}

#calendar {
	max-width: 900px;
	margin: 0 auto;
}
</style>

<script>

$(document).ready(function() {
	
	$('#calendar').fullCalendar({
		header: {
			left: 'prev,next today',
			center: 'title',
			right: 'month,basicWeek,basicDay'
		},
		defaultDate: '2016-05-12',
		editable: true,
		eventLimit: true, // allow "more" link when too many events
		events:'/messagework/calendarEvents',
		selectable: true,
		selectHelper: true,
		select: function(start, end) {
			var title = prompt('Event Title:');
			var eventData;
			if (title) {
				eventData = {
					title: title,
					start: start,
					end: end
				};
				$('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
			}
			$('#calendar').fullCalendar('unselect');
		},
	});
	
});
</script>
</head>
<body>
	<div id='calendar'></div>
</body>
</html>